#include<stack>
class CQueue {
public:
    CQueue() {

    }
    
    void appendTail(int value) {
        A.push(value);
    }
    
    int deleteHead() {
        if(A.empty())
            return -1;
        //出队列
        while(!A.empty())
        {
            B.push(A.top());
            A.pop();
        }
        int res=B.top();
        B.pop();
        //返回给A栈
        while(!B.empty())
        {
            A.push(B.top());
            B.pop();
        }
        return res;
    }
private:
    stack<int>A;//入队列
    stack<int>B;//出队列
};

/**
 * Your CQueue object will be instantiated and called as such:
 * CQueue* obj = new CQueue();
 * obj->appendTail(value);
 * int param_2 = obj->deleteHead();
 */